import request from '@/utils/request'

// 查询考试评阅教师列表
export const examTeacherList = (query) => {
    return request({
        url: '/system/exam/teacher/list',
        method: 'get',
        params: query
    })
}

// 新增考试评阅教师
export const examTeacherAdd = (query) => {
    return request({
        url: '/system/exam/teacher',
        method: 'post',
        data: query
    })
}

// 修改考试评阅教师
export const examTeacherEdit = (query) => {
    return request({
        url: '/system/exam/teacher',
        method: 'put',
        data: query
    })
}

// 删除考试评阅教师
export const examTeacherDel = (query) => {
    return request({
        url: '/system/exam/teacher/' + query,
        method: 'delete',
    })
}


// 查询角色和菜单关联列表
export const templatemenulist = (query) => {
    return request({
        url: '/template/menu/list',
        method: 'get',
        params: query
    })
}


// 修改角色和菜单关联
export const templatemenu = (query) => {
    return request({
        url: '/template/menu',
        method: 'put',
        data: query
    })
}

export function uploadImportTeacher(data,deptId,examId,examSchoolId){
    return request({
        url:`/system/exam/teacher/import?deptId=${deptId}&examId=${examId}&examSchoolId=${examSchoolId}`,
        method:'post',
        data:data,
        responseType: 'blob',
        headers: {
            'Content-Type': 'multipart/form-data' 
        }
    })
}
